<?php

//防止恶意调用
if (!defined('IN_MOD'))
{
    die('Hacking attempt');
}

// FastXCMS安装信息
if($configinfo['fastxcmsok'] == 1)
{
	// 当前广告Banner
	$advbanner = getadvbanner();
	$this->assign('advbanner', $advbanner);
	
	// 热门标签
	$article['post_content'] = seohotkeywords($article['post_content'],'fastxcms_portal_post',83,'category_id','post_title','hoturl','id');
	
	// 模块详情参数
	$article = getjsonarr($article);// 将thinkphp对象数据转换成数组
	$parameterinfo = getmoduleparameter($article['id'], $configinfo['moduleid']);
	if($parameterinfo)
	{
		$article = hbarray($article,$parameterinfo);
	}
	
	// 获取模块参数HTML[推荐参数与默认参数]
	$parameterinfo = getmoduleparameter($articleId, $configinfo['moduleid'], array('phtmlok' => 1));
	if($parameterinfo)
	{
		$article['recparalisthtml'] = $parameterinfo['recparalist'];
		$article['defparalisthtml'] = $parameterinfo['defparalist'];
		$article['paralisthtml'] = $parameterinfo['paralist'];
		$article['recparainfohtml'] = $parameterinfo['recparahtml'];
		$article['defparainfohtml'] = $parameterinfo['defparahtml'];
		$article['parainfohtml'] = $parameterinfo['parahtml'];
	}
	
	// 加载配置公用HTML代码 START
	include(MODULEPARA_PATH.'/configmodule/configmodule/module/article/confightml.php');
	if($configinfo['tplok'] == 1)
	{
		include($configinfo['tplurl'].'/configmodule/configmodule/module/article/confightml.php');
	}
	// 加载配置公用HTML代码 END
	
	// 新增加载单页内容代码程序
	if($configinfo['moduleinfo']['index_num'] == "自定义单页")
	{
		/* 开启数据库内容变量 */
		$aboutcontent = getaboutcontenthtml($articleId,70);
		if($aboutcontent)
		{			
			// 追加动态模板数据 DATE:2020-10-23 START
			$tpldata = array();
			$tpldata['aboutblock'] = $aboutblock;
			$loadtpl_aboutcontenthtml = getloadtpldata('aboutcontenthtml', $tpldata, $aboutcontent['contenthtml']);
			if($loadtpl_aboutcontenthtml['error'] == 0)$aboutcontent['contenthtml'] = $loadtpl_aboutcontenthtml['datacontent'];
			$loadtpl_aboutcontenthtml2 = getloadtpldata('aboutcontenthtml2', $tpldata, $aboutcontent['contenthtml2']);
			if($loadtpl_aboutcontenthtml2['error'] == 0)$aboutcontent['contenthtml2'] = $loadtpl_aboutcontenthtml2['datacontent'];
			$loadtpl_aboutcontenthtml3 = getloadtpldata('aboutcontenthtml3', $tpldata, $aboutcontent['contenthtml3']);
			if($loadtpl_aboutcontenthtml3['error'] == 0)$aboutcontent['contenthtml3'] = $loadtpl_aboutcontenthtml3['datacontent'];
			// 追加动态模板数据 DATE:2020-10-23 END
			
			$contenthtml = $aboutcontent['contenthtml'];
			require(MODULEPARA_INC_PATH.'service/VarokService.php');
			$contenthtml1 = $contenthtml;
			
			$contenthtml = $aboutcontent['contenthtml2'];
			require(MODULEPARA_INC_PATH.'service/VarokService.php');
			$contenthtml2 = $contenthtml;
			
			$contenthtml = $aboutcontent['contenthtml3'];
			require(MODULEPARA_INC_PATH.'service/VarokService.php');
			$contenthtml3 = $contenthtml;
			
			$this->assign('contenthtml',      $contenthtml1);
			$this->assign('contenthtml2',      $contenthtml2);
			$this->assign('contenthtml3',      $contenthtml3);
		}
	}
	
	// 当前位置
	$htmlinfo = array();
	$homeurl = cmf_url('portal/index/index');
	$htmlinfo['homehtml'] = '<a href="'.$homeurl.'">{name}</a> > ';
	if($configinfo['langok'] == 1)$hereurllang = "-{lang}";
	$htmlinfo['herehtml'] = '<a href="/list{id}'.$hereurllang.'.html">{name}</a> > ';
	$htmlinfo['herenowhtml'] = "{name}";
	$htmlinfo['titlehtml'] = $article['post_title'];
	$ur_here = seourhere('fastxcms_portal_category',$configinfo['columninfo']['id'],'id','parent_id','name',$htmlinfo);
	$this->assign('ur_here', $ur_here);
	
	// TAG标签列表
	if($configbase['tagok'] == 1 && $article['post_keywords'])
	{
		$taglist = getstrtoarr(",",$article['post_keywords']);
		$taglistarr = array();
		foreach($taglist as $key=>$val)
		{
			$taginfo = columninfo("fastxcms_portal_tag",$val,"name");
			if(is_array($taginfo))
			{
				$taglistarr[$key]['tag_id'] = $taginfo['id'];	
				$taglistarr[$key]['name'] = $taginfo['name'];	
			}
		}
		$this->assign('taglist',      $taglistarr);
	}
	
	$this->assign('article',      $article);
}
?>